<?php
namespace App\Utils\Other\Sandpay\Refund;

use App\Utils\Other\Sandpay\App;
use function Hyperf\Config\config;

Class Mini extends App {

    /**
     * 产品ID
     * @var string
     */
    protected string $productId = "00002021";

    /**
     * 路径
     * @var string
     */
    protected string $path = 'refund';

    public function __construct()
    {
        parent::__construct();
        $this->notify = getDomain()."/school/v1/refund/notify/sandpayMini";
        $this->appid = config('cloud.mini.app_id');
    }

    /**
     * 付款
     * @param array $params
     * @return array [$request, $response, $params]
     * @throws \GuzzleHttp\Exception\GuzzleException
     */
    public function handle(array $params):array
    {
        $params = $this->getParams($params);

        return $this->request($params);
    }
}